Introduction

msHeightmap is a plugin for generating, saving and loading heightmaps that can then be converted to a polygrid (mesh) in Milkshape3d, and saved in any of the formats the programs supports.

Due to the built-in restrictions in Milkshape3D 1.x, terrains with more than 16384 trianlges or 8192 vertices cannot be created (which means that the max size for a square terrain is 89x89), but the plugin handles heightmaps up to 256x256 that can still edited and used in other programs.

Interface

[1]Preview window [2]Width of terrain [3] Depth of heightmap [4] Seed of heightmap [5]Generate a new heightmap based on Width, Depth and Seed [6] Smooths the heightmap [7] Smooths the heightmap more [8] Execute the currently defined kernel effect [9] Opens the Custom Effect dialog [10] Loads a heightmap from an image [11] Save the current heightmap [12] Opens this helpfile


Generating Random Terrain

Enter the desired width [2] and height [3] and optionally a seed number [4]. The Rand button next to the seed field can be used to create a random seed. Then press Generate [5] and the heightmap will be presented in the Preview Window [1].


Loading Files

Press the Load File button [10], select the file you want to load in the dialog that appears, and press Ok. The image file should now be converted into a heightmap and displayed in the Preview Window [1].


Saving Files

Press the Save File button [11] ( after having created a heightmap ), enter a filename in the dialog that appears, and press Ok. Your heightmap should now be saved as a bitmap with the selected name.


Effects

The heightmaps created within the Generate function are hardly useful for terrain, which is why the Effects exist. Only the two basic effects are covered here, for more advanced manipulation, look at the Custom Effect Tool [8] topic.

The first of the Effects available is Smooth [6], which ( not surprisingly ) smooths the terrain, creating rounded hills and valleys. The second Effect, called Smooth More [7], is very similar but reduces the sharpness more than the first.


The Custom Effect Tool

The Custom Effect tool lets you create your own effect to apply to the loaded heightmap. To use the Custom Effect tool, you must first define the effect, which you do by pressing the '...' button [9] next to the Custom Effect button [8]. This will bring up the Custom Effect dialog.

The Custom Effect Dialog consist of nine fields that enable you to define a 3x3 kernel to use on your heightmaps. Each field can contain a positive or negative number, that represnts a multiplier. When you have defined a kernel and then use it by pressing the Custom Effect button [8], the kernel will be applied for every point in the heightmap. This means that the program loops through every point, and calculate it's new value by multiplying the value of the surrounding points with the corresponding value in the kernel, and then divide by the sum of the multipliers.

Here are a few example kernels for you to try: This one sharpens the heightmap

[-1][-1][-1]
[-1][9][-1]
[-1][-1][-1]

And this one shifts it to the right

[0][0][0]
[0][0][1]
[0][0][0]